package com.scm.service;

import com.scm.dao.ScmUserMapper;
import com.scm.pojo.ScmUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @ClassName ScmService
 * @Description TODO
 * @Author Xu
 * @Date 2021/7/5 19:48
 * @Version 1.0
 **/
@Service
public class ScmService implements ScmUserMapper {
    @Resource
    private ScmUserMapper scmUserMapper;
    @Override
    public List<ScmUser> getAllScmUser() {
        return scmUserMapper.getAllScmUser();
    }

    @Override
    public int countAll() {
       return scmUserMapper.countAll();
    }

    @Override
    public List<ScmUser> findAll(Map<String, Object> params) {
        return scmUserMapper.findAll(params);
    }

    @Override
    public void addUser(ScmUser user) {
        scmUserMapper.addUser(user);
    }

    @Override
    public void deleteUser(String account) {
        scmUserMapper.deleteUser(account);
    }

    @Override
    public ScmUser findUser(String name) {
        return scmUserMapper.findUser(name);
    }

    @Override
    public void updateUser(ScmUser user) {
        scmUserMapper.updateUser(user);
    }

    @Override
    public String findAccount(String name) {
        return scmUserMapper.findAccount(name);
    }

    @Override
    public String getUserName(String account) {
        return scmUserMapper.getUserName(account);
    }
}
